///
/// 应用参数：开场白模型
///
class OpeningRemarksData {
  /// 开场白
  final String? openingStatement;

  /// 开场推荐问题列表
  final List<String> suggestedQuestions;

  /// 启用回答后给出推荐问题
  final SuggestedQuestionsAfterAnswerSwitch? suggestedQuestionsAfterAnswer;

  /// 语音转文本
  final SpeechToTextModel? speechToText;

  /// 文本转语音
  final TextToSpeechModel? textToSpeech;

  /// 引用和归属
  final RetrieverResource? retrieverResource;

  /// 标记回复
  final AnnotationReply? annotationReply;

  const OpeningRemarksData({
    this.openingStatement,
    this.suggestedQuestions = const [],
    this.suggestedQuestionsAfterAnswer,
    this.speechToText,
    this.textToSpeech,
    this.retrieverResource,
    this.annotationReply,
  });

  factory OpeningRemarksData.fromJson(Map<String, dynamic> json) {
    return OpeningRemarksData(
      openingStatement: json['opening_statement'],
      suggestedQuestions: List<String>.from(json['suggested_questions']),
      suggestedQuestionsAfterAnswer: json['suggested_questions_after_answer'] != null ? SuggestedQuestionsAfterAnswerSwitch.fromJson(json['suggested_questions_after_answer']) : null,
      speechToText: json['speech_to_text'] != null ? SpeechToTextModel.fromJson(json['speech_to_text']) : null,
      textToSpeech: json['text_to_speech'] != null ? TextToSpeechModel.fromJson(json['text_to_speech']) : null,
      retrieverResource: json['retriever_resource'] != null ? RetrieverResource.fromJson(json['retriever_resource']) : null,
      annotationReply: json['annotation_reply'] != null ? AnnotationReply.fromJson(json['annotation_reply']) : null,
    );
  }
}

///
/// 启用回答后给出推荐问题开关模型
///
class SuggestedQuestionsAfterAnswerSwitch {
  bool enabled;

  SuggestedQuestionsAfterAnswerSwitch({
    this.enabled = true,
  });

  factory SuggestedQuestionsAfterAnswerSwitch.fromJson(Map<String, dynamic> json) {
    return SuggestedQuestionsAfterAnswerSwitch(
      enabled: json['enabled'],
    );
  }
}

///
/// 语音转文本模型
///
class SpeechToTextModel {
  bool enabled;

  SpeechToTextModel({
    this.enabled = false,
  });

  factory SpeechToTextModel.fromJson(Map<String, dynamic> json) {
    return SpeechToTextModel(
      enabled: json['enabled'],
    );
  }
}

///
/// 文本转语音模型
///
class TextToSpeechModel {
  bool enabled;
  String? language;
  String? voice;
  String? autoPlay;

  TextToSpeechModel({
    this.enabled = false,
    this.language,
    this.voice,
    this.autoPlay,
  });

  factory TextToSpeechModel.fromJson(Map<String, dynamic> json) {
    return TextToSpeechModel(
      enabled: json['enabled'],
      language: json['language'],
      voice: json['voice'],
      autoPlay: json['autoPlay'],
    );
  }
}

///
/// 引用和归属
///
class RetrieverResource {
  bool enabled;

  RetrieverResource({
    this.enabled = true,
  });

  factory RetrieverResource.fromJson(Map<String, dynamic> json) {
    return RetrieverResource(
      enabled: json['enabled'],
    );
  }
}

///
/// 标记回复
///
class AnnotationReply {
  bool enabled;

  AnnotationReply({
    this.enabled = false,
  });

  factory AnnotationReply.fromJson(Map<String, dynamic> json) {
    return AnnotationReply(
      enabled: json['enabled'],
    );
  }
}

///
/// 用户输入表单配置
///
class UserInputForm {}

///
/// 文件上传配置
///
class FileUpload {}

///
/// 系统参数
///
class SystemParameters {}
